<?php

class News_class_model extends CI_Model
{
    private $table = 'news_class';

    public function page_list($page_num, $num)
    {
        $this->db->order_by('sort', 'desc');
        $this->db->limit($page_num, $num);

        return $this->db->get($this->table);
    }

    public function findById($id)
    {
        $this->db->where('class_id', $id);

        return $this->db->get($this->table);
    }
}